<html>
	<head>
		<title><%= @_title || "Byelr.com 毕业咯! 欢迎您"%></title>
		<%= javascript_include_tag :defaults %>
		<%= load_lightbox %>
		<%= javascript_include_tag :fckeditor %>
		<%= stylesheet_link_tag "base" %>
		<link href="/random/css" media="screen" rel="Stylesheet" type="text/css" />
	</head>
	
	<body>
		<div id="container">
			<div id="header">
				<%= render :partial => 'share/login' %>
				<div id="logo">
					<a href="http://byelr.com">
						<img src="/images/logo.png" alt="首页"/>
					</a>
				</div>
				<div id="ad">
					<a href="#" onclick="alert('别乱点了，I 服了 you...');">
						<img src="/images/ad.gif"/>
					</a>
				</div>
			</div>
			<div id="navigator">
				<%= render :partial => 'share/navibar' %>
			</div>
			<br/><br/>
			<div id="left">
			</div>
			<div id="middle">
				<%= yield %>
			</div>
			<div id="right">
				<%= render :partial => 'widget/avatar' %>
			</div>
			<div id="footer">
			</div>
		</div>
		<div id='_login' style='display: none'>
			<% form_tag sessions_path do -%>
			<table>
				<tr>
					<td style="text-align: right"><label for="login">用户名: </label></td>
					<td style="text-align: left"><%= text_field_tag 'login' %></td>
				</tr>
				<tr>
					<td style="text-align: right"><label for="password">密码: </label></td>
					<td style="text-align: left"><%= password_field_tag 'password' %></td>
				</tr>
				<tr>
					<td style="text-align: right"><%= check_box_tag 'remember_me' %></td>
					<td style="text-align: left"><label for="remember_me">自动登录</label></td>
				</tr>
				<tr>
					<td style="text-align: right"><%= submit_tag '登录' %></td>
					<td style="text-align: right"><%= link_to_lightbox '注册', '_signup' %></td>
				</tr>
			</table>
			<% end -%>
		</div>
		<div id='_signup' style='display: none'>
			<%= error_messages_for :user %>
			<% form_for :user, :url => users_path do |f| -%>
			<table>
				<tr>
					<td style="text-align: right"><label for="login">用户名:</label></td>
					<td style="text-align: left"><%= f.text_field :login %></td>
				</tr>
				<tr>
					<td style="text-align: right"><label for="email">Email:</label></td>
					<td style="text-align: left"><%= f.text_field :email %></td>
				</tr>
				<tr>
					<td style="text-align: right"><label for="password">密码:</label></td>
					<td style="text-align: left"><%= f.password_field :password %></td>
				</tr>
				<tr>
					<td style="text-align: right"><label for="password_confirmation">确认密码:</label></td>
					<td style="text-align: left"><%= f.password_field :password_confirmation %></td>
				</tr>
				<tr>
					<td style="text-align: right"><%= submit_tag '注册' %><td>
					<td style="text-align: right"><%= link_to_lightbox '登录', '_login' %></td>
				</tr>
			</table>
			<% end -%>
		</div>
	</body>
</html>